#include <fstream>
#include <iostream>
using namespace std;

class FileText: public ifstream
{
	string _text;
public:
	const string& text;
public:
	FileText(const char* path):ifstream(path),text(_text){read();}
	FileText(const string& path):ifstream(path),text(_text){read();}
public:
	string read(void)
	{
		_text = "";
		seekg(0, beg);
		for(int i = 0; i < 1024; i++)
		{
			char buf[1024+1] = {0};
			int r = readsome(buf, sizeof(buf)-1);
			if(r < 1)
			{
				break;
			}
			buf[r] = 0;
			_text += buf;
		}
		return _text;
	}
	string nowhite(void)
	{
		_text = "";
		seekg(0, beg);
		while(good())
		{
			string s;
			(*this) >> s;
			_text += s;
		}
		return _text;

	}
};
